package com.zxq.common.middleware.lock;

import java.util.concurrent.TimeUnit;

/**
 * 分布式锁
 */
public interface Lock {

    boolean tryLock();

    boolean tryLock(long time, TimeUnit unit) throws InterruptedException;

    void unlock();

    String getName();

}
